namespace MyCollections
{
    public class ListEnumerator<T>
    {
        private List<T> _list;
        private int _current;

        public ListEnumerator(List<T> list)
        {
            _list = list;
            _current = -1;
        }

        public T Current
        {
            get { return _list[_current]; }
        }

        public bool MoveNext ()
        {
            _current++;
            return _current < _list.Count;
        }

        public void Reset ()
        {
            _current = -1;
        }
    }
}